package com.example.demo;

import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * @Description:
 * @Author: LiangJiawen
 * @Create Date Time: 2021/4/22 13:29.
 * @Update Date Time: 
 * @see
 */
@Aspect
@Component
public class TestAop {

    @Pointcut("execution(* com.example.demo.MyTest.say(..))")
    public void pointCut(){

    }

    @Before("pointCut()")
    public void before(){
        System.out.println("======【AOP - 前置通知】======");
    }

    @AfterReturning("pointCut()")
    public void afterReturning(){
        System.out.println("======【AOP - 后置返回通知】======");
    }
}
